Throughput refers to the maximum transmission rate at which a network device sends and receives frames under the condition that there is no frame loss. It is one of the most important indicators reflecting the performance of a network device. The value of a network device's throughput will be different when the network device is in a different operating modes or different environments. Generally, we respectively perform a bi-directional throughput test for data frames with the sizes of 64, 128, 256, 512, 1024, 1280 and 1518 bytes during the test, to obtain the maximum transmission rate under the condition that there is no frame loss. Throughput is generally indicated in two ways, one is using percentage (TP%) for indicating, and the other one is using frames/sec (TPpps) for indicating, and the representations of these two throughputs can be mutually converted through the following formula:Bbps×TP%=TPpps×(Lf+Lc)
wherein Bbps on the left side of the formula is the theoretical bandwidth (Unit: bits/sec) of the network device; TP% is the percentage of the throughput; and Bbps×TP% represents the total number of bits that the network device can transmit within one second; TPpps on the right side of the formula is the value of the throughput in frames/second; Lf is the length (Unit: bits) of the Ethernet data frame used in the current test; Lc is a constant 160 (Unit: bits), because the front of each Ethernet frame has an extra overhead of 160 bits, that is, 8 bytes of preamble plus 12 bytes of inter-frame space; and (Lf+Lc) indicates the number of bits actually transmitted in the Ethernet data frame.
In the related art, professional testers are used to test the throughput of a network device to be tested, for example, using the tester Smartbits to test the throughput of a network device to be tested by using the dichotomy approximation method comprises the following steps:
step (1), the Smartbits device creates the Ethernet data frame flow F, and the length of a data frame is defined as 64 bytes, the size of the flow F is initialized as the theoretical throughput value TPpps of the network device, namely, the TP% corresponding to the TPpps equals 100%.
Step (2), the Smartbits device starts sending the Ethernet data frame flow F from the sending port A to the receiving port B of the network device.
Step (3), after receiving the flow F from the receiving port B, the network device processes and then sends the flow F from the sending port C to the receiving port D of the Smartbits device.
Step (4), the Smartbits device receives the Ethernet data frame flow F from the receiving port D.
Step (5), after the time period of Ts (such as 1 minute), the Smartbits device stops sending the Ethernet data frame flow F and analyzes the statistics of the received and sent frames, and the specific analysis is described as follows:
(a) if no frame loss occurs when TP%=100%, the throughput test is completed, and the throughput of the network device is 100%;
(b) if a frame loss occurs when TP%=100%, it is to decrease the flow rate TP% from 100% to 50%, then proceed to step (2) to retest.
(c) if no frame loss occurs when TP%=50%, it is to increase the flow rate TP% from 50% to 75%, then proceed to step (2) to retest;
(d) if a frame loss still occurs when TP%=50%, it is to decrease the flow rate TP% from 50% to 25%, then proceed to step (2) to retest. (6) after repeating the test for several times, eventually an accurate throughput